<html><head>
        <link href="<?php echo base_url('assets/css/formpenduduk.css'); ?>" rel="stylesheet" type="text/css">
        <link href="<?php echo base_url('assets/js/jquery-ui.css'); ?>" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-1.9.1.js'); ?>"></script>
        <script type="text/javascript" src="<?php echo base_url('assets/js/jquery-ui.js'); ?>"></script>
    </head>
    <body>
        
            <table width="100%" border="0" align="center">
                <tr>
                    <td colspan="8" class="trheader">Laporan Data Penduduk</td>
                </tr>

                <tr>
                    <td colspan="8" bordercolor="#666666" class="trheader">Kategori : Per Jenis Kelamin</td>
                </tr>
                <tr>
                    <td colspan="2" bordercolor="#666666" class="cari">&nbsp;</td>
                    <td bordercolor="#666666" class="cari">&nbsp;</td>
                    <td colspan="10" bordercolor="#666666" class="cari">&nbsp;</td>
                </tr>
                <form action="<?php echo base_url('penduduk/cari_jk'); ?>" method="post" enctype="multipart/form-data">
                <tr>
                    <td colspan="14" bordercolor="#666666" class="cari">Cari Jenis Kelamin  : 
                        <select name="idjenis_kelamin" class="list">
                            <?php
                            if (isset($jenis_kelamin)) {
                                foreach ($jenis_kelamin->result() as $data_jenis_kelamin) {
                                    echo '<option value="' . $data_jenis_kelamin->idjenis_kelamin . '">' . $data_jenis_kelamin->jenis_kelamin . '</option>';
                                }
                            }
                            ?>
                        </select>                
                        <input type="submit" name="cari" id="cari" value="Cari" class="btn btn-large"/></td>
                </tr>
                </form>
                <tr>
                  <td colspan="8" bordercolor="#666666" class="tampilcari">&nbsp;</td>
                </tr>
                <tr>
                <td colspan="8" bordercolor="#666666" class="tampilcari"><div align="center">Daftar penduduk dengan jenis kelamin : <?php echo isset($nama_jeniskelamin->jenis_kelamin) ? $nama_jeniskelamin->jenis_kelamin : ''; ?></div></td>
                </tr>  
                <tr class="jeda">
                    <td width="5%" bordercolor="#666666"><div align="center"><strong>No.</strong></div></td>
                    <td width="19%" bordercolor="#666666"><div align="center"><strong>Nama</strong></div></td>
                    <td width="14%" bordercolor="#666666"><div align="center"><strong>NIK</strong></div></td>
                    <td width="16%" bordercolor="#666666"><div align="center"><strong>Nomor KK</strong></div></td>
                    <td width="11%" bordercolor="#666666"><div align="center"><strong>Tempat Lahir</strong></div></td>
                    <td width="13%" bordercolor="#666666"><div align="center"><strong>Tanggal Lahir</strong></div></td>
                    <td width="12%" bordercolor="#666666"><div align="center"><strong>Alamat</strong></div></td>
                    <td width="10%" bordercolor="#666666"><div align="center"><strong>Status</strong></div></td>


                </tr>

                <?php
                if (isset($penduduk)) {
                    $no = 1;
                    foreach ($penduduk->result() as $data_penduduk) {
                        echo '<tr>';
                        echo '<td><div align="center">' . $no++ . '</div></td>';
                        echo '<td>' . $data_penduduk->nama . '</td>';
                        echo '<td>' . $data_penduduk->nik . '</td>';
                        echo '<td>' . $data_penduduk->no_kk . '</td>';
                        echo '<td>' . $data_penduduk->tempat_lahir . '</td>';
                        echo '<td>' . $this->tanggal->tanggal_indonesia($data_penduduk->tanggal_lahir) . '</td>';
                        echo '<td>' . $data_penduduk->alamat . ' RT ' . $data_penduduk->rt . ', RW ' . $data_penduduk->rw . ' Dusun ' . $data_penduduk->dusun . '</td>';
                        echo '<td><div align="center">'; 
                        echo $data_penduduk->status?'Aktif':'Tidak aktif'; 
                        echo '</div></td>';

                        echo '</tr>';
                    }
                }
                ?>
            </table>
            <br>
            <table width="289" border="0" align="center">
                <tr>
                    <td colspan="2" class="jeda">Data Tercatat</td>
                </tr>
                <tr>
                    <td width="110">Jumlah </td>
                    <td width="169">: <?php echo $penduduk->num_rows();  ?>  orang</td>
                </tr></table>
    </body>
</html>
